package com.codeoss.framework.webide.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.codeoss.framework.webide.request.ReportWizardDialogRequest;
import com.codeoss.framework.webide.response.ReportWizardDialogResponse;
import com.codeoss.framework.webide.service.IReportWizardDialogService;

@Controller
@RequestMapping("webide/reportwizarddialog")
public class ReportWizardDialogController {
	@Autowired
	private IReportWizardDialogService reportWizardDialogService;

	@RequestMapping(value = "onFinish", method = RequestMethod.POST)
	@ResponseBody
	public ReportWizardDialogResponse onFinish(@RequestBody ReportWizardDialogRequest reportWizardDialogRequest) {
		ReportWizardDialogResponse reportWizardDialogResponse = reportWizardDialogService.onFinish(reportWizardDialogRequest);
		return reportWizardDialogResponse;
	}
	
	@RequestMapping(value = "initModuleTypeSelectPage", method = RequestMethod.GET)
	@ResponseBody
	public ReportWizardDialogResponse initModuleTypeSelectPage() {
		ReportWizardDialogResponse reportWizardDialogResponse = reportWizardDialogService.initModuleTypeSelectPage();
		return reportWizardDialogResponse;
	}
}
